#include "gtkintl.h"
+struct _GtkFixedPriv
+{
+ GList *children;
+};
+
enum {
CHILD_PROP_0,
CHILD_PROP_X,
G_MAXINT,
0,
GTK_PARAM_READWRITE));
+
+ g_type_class_add_private (class, sizeof (GtkFixedPriv));
}
static GType
static void
gtk_fixed_init (GtkFixed *fixed)
{
+ GtkFixedPriv *priv;
+
+ fixed->priv = G_TYPE_INSTANCE_GET_PRIVATE (fixed,
+ GTK_TYPE_FIXED,
+ GtkFixedPriv);
+ priv = fixed->priv;
+
gtk_widget_set_has_window (GTK_WIDGET (fixed), FALSE);
- fixed->children = NULL;
+ priv->children = NULL;
}
GtkWidget*
get_child (GtkFixed *fixed,
GtkWidget *widget)
{
+ GtkFixedPriv *priv = fixed->priv;
GList *children;
-
- children = fixed->children;
+
+ children = priv->children;
while (children)
{
GtkFixedChild *child;
gint x,
gint y)
{
+ GtkFixedPriv *priv = fixed->priv;
GtkFixedChild *child_info;
g_return_if_fail (GTK_IS_FIXED (fixed));
gtk_widget_set_parent (widget, GTK_WIDGET (fixed));
- fixed->children = g_list_append (fixed->children, child_info);
+ priv->children = g_list_append (priv->children, child_info);
}
static void
gtk_fixed_size_request (GtkWidget *widget,
GtkRequisition *requisition)
{
- GtkFixed *fixed;
+ GtkFixedPriv *priv;
+ GtkFixed *fixed;
GtkFixedChild *child;
GList *children;
GtkRequisition child_requisition;
guint border_width;
fixed = GTK_FIXED (widget);
+ priv = fixed->priv;
+
requisition->width = 0;
requisition->height = 0;
- children = fixed->children;
+ children = priv->children;
while (children)
{
child = children->data;
gtk_fixed_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
- GtkFixed *fixed;
+ GtkFixed *fixed = GTK_FIXED (widget);
+ GtkFixedPriv *priv = fixed->priv;
GtkFixedChild *child;
GtkAllocation child_allocation;
GtkRequisition child_requisition;
GList *children;
guint border_width;
- fixed = GTK_FIXED (widget);
-
widget->allocation = *allocation;
if (gtk_widget_get_has_window (widget))
border_width = gtk_container_get_border_width (GTK_CONTAINER (fixed));
- children = fixed->children;
+ children = priv->children;
while (children)
{
child = children->data;
gtk_fixed_remove (GtkContainer *container,
GtkWidget *widget)
{
- GtkFixed *fixed;
+ GtkFixed *fixed = GTK_FIXED (container);
+ GtkFixedPriv *priv = fixed->priv;
GtkFixedChild *child;
- GtkWidget *widget_container;
+ GtkWidget *widget_container = GTK_WIDGET (container);
GList *children;
- fixed = GTK_FIXED (container);
- widget_container = GTK_WIDGET (container);
-
- children = fixed->children;
+ children = priv->children;
while (children)
{
child = children->data;
gtk_widget_unparent (widget);
- fixed->children = g_list_remove_link (fixed->children, children);
+ priv->children = g_list_remove_link (priv->children, children);
g_list_free (children);
g_free (child);
gpointer callback_data)
{
GtkFixed *fixed = GTK_FIXED (container);
+ GtkFixedPriv *priv = fixed->priv;
GtkFixedChild *child;
GList *children;
- children = fixed->children;
+ children = priv->children;
while (children)
{
child = children->data;